 /*
{
"状态":1,
"名称":"报销分析-获取店铺信息",
"作者":"谌舜谋",
"创建时间":"2018-10-30",
"功能":"报销分析-获取店铺信息",
"log": [
  {"date":"" , "dev" :"" , "content" : ""}
]
}
*/
declare  @user_key int 
set  @user_key='{user_key}'

--获取店铺信息
select '' as entity_code,N'全部' as  entityName
union all
select Customer_id as entity_code,Customer_na as  entityName  from Customer where isnull(DealInPattern,'') not in ('线上','其他') 
AND Customer_id IN (SELECT  convert(char(10),entity_code) FROM ei.dbo.ft_getuserentity(@user_key))